package com.go.where.manager.dao.system.impl;

import org.springframework.stereotype.Repository;

import com.go.where.manager.dao.impl.BaseDaoImpl;
import com.go.where.manager.dao.system.OperatorDao;
import com.go.where.manager.pojo.user.OperatorInfo;

@Repository("operatorDao")
public class OperatorDaoImpl extends BaseDaoImpl<OperatorInfo> implements
		OperatorDao {

	@Override
	public OperatorInfo queryByAccount(String userId) {
		OperatorInfo op = this.getSqlSession().selectOne(
				getNameSpace() + ".selectByKey", userId);
		return op;
	}

	@Override
	public void updateOperLogin(OperatorInfo operator) {
		this.getSqlSession().update(getNameSpace() + ".update", operator);
	}

	@Override
	protected String getNameSpace() {
		return "mybatis.xml.OperatorInfoMapper";
	}

}
